home *** CD-ROM | disk | FTP | other *** search
- /*
- * CBLibrary - Pal256
- * Copyright (C) 2003 Chris Bazley
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
- /*
- 256 colour selection dialogue
-
- Usage:
- - Create a Pal256 object and call Pal256_initialise to register handers etc.
- - Register a toolbox event handler for event Pal256_ColourSelected.
- - Client must call Pal256_set_colour before dialogue is displayed (trap Window_AboutToBeShown event or similar if necessary).
- - Upon receiving a Pal256_ColourSelected event, check that parent object/component match yours before using the returned colour number.
- */
-
- #ifndef Pal256_h
- #define Pal256_h
-
- #include "kernel.h"
- #include "toolbox.h"
-
- /****************************************************************************
- * Pal256 Toolbox Events *
- ****************************************************************************/
-
- #define Pal256_ColourSelected 0x100
-
- typedef struct
- {
- ToolboxEventHeader hdr;
- int colour_number;
- } Pal256ColourSelectedEvent;
-
- /****************************************************************************
- * Pal256 Functional Interface *
- ****************************************************************************/
-
- extern _kernel_oserror *Pal256_initialise(ObjectId object);
- extern _kernel_oserror *Pal256_set_colour(ObjectId object, char colour_number);
-
- #endif
-